import javax.xml.crypto.dsig.SignedInfo;

class Singleton1 {
    private static volatile Singleton1 instance = null;

    private static Object locker = new Object();

    private Singleton1() {

    }

    public static Singleton1 getInstance() {
        if (instance == null) {
            synchronized (locker) {
                if (instance == null) {
                    instance = new Singleton1();
                }
            }
        }
        return instance;
    }
}

public class Demo2 {
}
